package com.zheng.PointTest.base.response;

/**
 * className:ResponseCode
 * Package:com.zheng.PointTest.base
 * Description:
 *
 * @Author:ZhengJinLong Create:2024/7/3 - 21:54
 * @Version:v1.0
 */
public enum ResponseCode {
    /**
     * 成功返回的状态码
     */
    SUCCESS(0, "success"),


    /**
     * 成功返回的状态码
     */
    FAIL(-1, "fail"),

    /**
     * 资源不存在的状态码
     */
    RESOURCES_NOT_EXIST(404, "资源不存在"),
    /**
     * 所有无法识别的异常默认的返回状态码
     */
    SERVICE_ERROR(500, "服务器异常");
    /**
     * 状态码
     */
    private int code;
    /**
     * 返回信息
     */
    private String msg;

    ResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
